import request from '@/utils/request'

// 获取部门员工简单信息列表
export const getUsersimple = () => request({
  url: '/sys/user/simple'
})

// 获取员工信息列表
export const getUserInfoList = (params) => request({
  url: '/sys/user',
  method: 'GET',
  params
})

// 删除员工信息
export const delUserInfo = id => request({
  url: `/sys/user/${id}`,
  method: 'DELETE'
})

// 新增员工信息
export const addUserInfo = data => request({
  url: '/sys/user',
  method: 'POST',
  data
})

// excel表格导入
export const importEmployee = data => request({
  url: '/sys/user/batch',
  method: 'post',
  data
})

// 保存用户信息
export const saveUserDetailById = data => request({
  url: `/sys/user/${data.id}`,
  method: 'put',
  data
})
